package com.jstyle.jclifexd.view;

import android.content.Context;
import android.content.DialogInterface;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.LinearLayout;


import com.jstyle.jclifexd.R;
import com.jstyle.jclifexd.model.ActionData;
import com.jstyle.jclifexd.utils.RxBus;
import com.jstyle.jclifexd.utils.ScreenUtils;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by Administrator on 2018/5/4.
 */

public class FeedBackFinishDialog extends JstyleDialog {
    @BindView(R.id.iv_feedback_finish)
    ImageView ivFeedbackFinish;
    @BindView(R.id.ll_feedback_finish)
    LinearLayout llFeedbackFinish;

    public FeedBackFinishDialog(@NonNull Context context) {
        super(context);
    }

    public FeedBackFinishDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
    }

    public FeedBackFinishDialog(@NonNull Context context, boolean cancelable, @Nullable DialogInterface.OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected void setContentView() {
        setContentView(R.layout.dialog_feedback_finish);
        init();
    }

    private void init() {
        setCancelable(false);
        initWidth(ScreenUtils.getScreenWidth(getContext()));
        initHeight(ScreenUtils.getScreenHeight(getContext()));
    }

    @OnClick(R.id.ll_feedback_finish)
    public void onViewClicked() {
        RxBus rxBus=RxBus.getInstance();
        ActionData actionData=new ActionData();
        actionData.setAction(ActionData.FinishFeedBack);
        rxBus.post(actionData);
        dismiss();
    }

//    @OnClick(R.id.iv_feedback_finish)
//    public void onViewClicked() {
//        dismiss();
//    }
}
